


{%- capture hover_class -%}
{% if theme_config.global.product_move_two %}{% if product.images[1].src %}animation-hover{% endif %}{% endif %}
{%- endcapture -%}


{%- capture product_handle -%}
{% if product.handle and product.handle != "" %}
{%- if collection_handle and collection_handle != "" -%}/collections/{{collection_handle}}{% endif %}/products/{{ product.handle }}?data_from={{data_from}}
{% else %}
javascript:;
{%- endif -%}
{%- endcapture -%}

{%- capture product_alt -%}
{%- if product.image.alt == "" -%}
  {{ product.title }}
  {%- else -%}
  {{ product.image.alt }}
{%- endif -%}
{%- endcapture -%}


<a href="{{product_handle}}" alt="{{product_alt}}" class="collection-product-item {{hover_class}}">
  <img class="collection-product-item-image main-image" data-sizes=”auto” alt="{{product_alt}}" data-src="{{ product.src }}" src="{{ 'empty.png' | public_asset_abs_url }}"/>
  <img class="collection-product-item-image hover-two" data-sizes=”auto” alt="{{product_alt}}" data-src="{{ product.images[1].src }}" src="{{ 'empty.png' | public_asset_abs_url }}"/>
    {% if theme_config.global.product_discount_label and product.variant.price > 0 and product.variant.price < product.variant.compare_at_price %} 
    {% assign price = product.variant.compare_at_price | minus: product.variant.price | divided_by: product.variant.compare_at_price | times: 100 | floor %}
    {% if price > 0 %}
    <div class="collection-product-discount">-{{ price }}%</div>
    {% endif %}
    {% endif %}
  <div class="item-caption">
    <div class="item-caption-title font-size-12 text-ellipsis {% unless theme_config.global.product_title_model %}model-hide{% endunless %}">{{ product.highlight_title | default : product.title | default:"Title" }}</div>
    <div class="item-caption-price font-size-12">
      {% if product.variant.compare_at_price != "0" and  product.variant.price < product.variant.compare_at_price %}
        <span style="text-decoration: line-through;opacity: 0.6;margin-right: 4px;">{{ product.variant.compare_at_price | default : "88.88" | money }}</span>
      {% endif %}
      <span>{{ product.variant.price | default : "88.88" | money }}</span>
    </div>
    {% if product.available == 0 %}
    <div class="collection-product-soldout">{{ lang.general.sold_out }}</div>
    {% endif %}
  </div>

  {% if theme_config.global.product_preview %}
  <div class="actions-wrapper">
    <div class="actions-wrapper-btn product_view"  data-handle="{{ product.handle }}" data-from="{{data_from}}" >
      {% include "icon_goya_fangda" %}
    </div>
  </div>
  {% endif %}
</a>